﻿using Dora.Services.AdminUser.Dto.QueryDto;
using Dora.Services.AdminUser.Entities;
using Dora.Tools.Utility.Const;
using Surging.Core.Common;
using Surging.Core.CPlatform.Ioc;
using Surging.Core.CPlatform.Runtime.Server.Implementation.ServiceDiscovery.Attributes;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Dora.Services.AdminUser.IApplication
{
    /// <summary>
    /// 广告位表服务接口
    /// </summary>
    [ServiceBundle("api/" + DoraModuleName.AdminUser + "/{Service}")]
    public interface IAdPositionService : IServiceKey
    {
        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "创建")]
        Task<ResultDto<int>> Create(AdPositionEntity entity);

        /// <summary>
        /// 根据Id获取一个实体对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "根据Id获取一个实体对象")]
        Task<AdPositionEntity> GetById(int id);

        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "分页获取数据")]
        Task<PageDataList<AdPositionEntity>> GetPageList(AdPositionQueryDto input);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "修改")]
        Task<bool> Update(AdPositionEntity entity);

        /// <summary>
        /// 根据IdList获取列表
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "根据IdList获取列表")]
        Task<List<AdPositionEntity>> GetList(List<int> idList);

        /// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "获取所有")]
        Task<List<AdPositionEntity>> GetAll();

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-24", Director = "ZPD", Name = "删除")]
        Task<ResultDto<bool>> Delete(AdPositionEntity entity);
    }
}
